Virtual machine joining or separating

ABSTRACT

In one aspect, a method includes separating a set of virtual machines from a first consistency group to a second consistency group and third consistency group. The method also includes combining a first virtual machine of the second consistency group to the third consistency group to form a fourth consistency group.

BACKGROUND

Computer data is vital to today's organizations and a significant partof protection against disasters is focused on data protection. Assolid-state memory has advanced to the point where cost of memory hasbecome a relatively insignificant factor, organizations can afford tooperate with systems that store and process terabytes of data.

Conventional data protection systems include tape backup drives, forstoring organizational production site data on a periodic basis. Anotherconventional data protection system uses data replication, by creating acopy of production site data of an organization on a secondary backupstorage system, and updating the backup with changes. The backup storagesystem may be situated in the same physical location as the productionstorage system, or in a physically remote location. Data replicationsystems generally operate either at the application level, at the filesystem level, or at the data block level.

SUMMARY

In one aspect, a method includes separating a set of virtual machinesfrom a first consistency group to a second consistency group and thirdconsistency group. The method also includes combining a first virtualmachine of the second consistency group to the third consistency groupto form a fourth consistency group.

In another aspect, an apparatus includes electronic hardware circuitryconfigured to separate a set of virtual machines from a firstconsistency group to a second consistency group and third consistencygroup and combine a first virtual machine of the second consistencygroup to the third consistency group to form a fourth consistency group.

In a further aspect, an article includes a non-transitorycomputer-readable medium that stores computer-executable instructions.The instructions cause a machine to separate a set of virtual machinesfrom a first consistency group to a second consistency group and thirdconsistency group and combine a first virtual machine of the secondconsistency group to the third consistency group to form a fourthconsistency group.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of an example of a data protection system.

FIG. 2 is an illustration of an example of a journal history of writetransactions for a storage system.

FIG. 3 is a block diagram of an example of separating a virtual machineinto a separate consistency group, according to one embodiment of thedisclosure.

FIG. 4 is a flowchart of an example of a process to separate a virtualmachine into a separate consistency group, according to one embodimentof the disclosure.

FIG. 5 is a block diagram of an example of joining consistency groups,according to one embodiment of the disclosure.

FIG. 6 is a flowchart of an example of a process to join consistencygroups, according to one embodiment of the disclosure.

FIG. 7 is a computer on which any of the processes of FIGS. 4 and 6 maybe implemented, according to one embodiment of the disclosure.

DETAILED DESCRIPTION

Described herein are techniques to unify multiple consistency groups(CGs) into a single CG and to separate a CG into more than one CG.

The following definition may be useful in understanding thespecification and claims.

I/O REQUEST—an input/output request (sometimes referred to as an I/O),which may be a read I/O request (sometimes referred to as a read requestor a read) or a write I/O request (sometimes referred to as a writerequest or a write);

A description of journaling and some techniques associated withjournaling may be described in the patent titled “METHODS AND APPARATUSFOR OPTIMAL JOURNALING FOR CONTINUOUS DATA REPLICATION” and with U.S.Pat. No. 7,516,287, which is hereby incorporated by reference.

Referring to FIG. 1, a data protection system 100 includes two sites;Site I, which is a production site, and Site II, which is a backup siteor replica site. Under normal operation the production site is thesource side of system 100, and the backup site is the target side of thesystem. The backup site is responsible for replicating production sitedata. Additionally, the backup site enables roll back of Site I data toan earlier pointing time, which may be used in the event of datacorruption of a disaster, or alternatively in order to view or to accessdata from an earlier point in time.

FIG. 1 is an overview of a system for data replication of eitherphysical or virtual logical units. Thus, one of ordinary skill in theart would appreciate that in a virtual environment a hypervisor, in oneexample, would consume logical units, generate a distributed file systemon them (such as, for example, VMWARE® VMFS® creates files in the filesystem) and exposes the files as logical units to the virtual machines(e.g., each VMDK is seen as a SCSI device by virtual hosts). In anotherexample, the hypervisor consumes a network based file system and exposesfiles in the NFS as SCSI devices to virtual hosts.

During normal operations, the direction of replicate data flow goes fromsource side to target side. It is possible, however, for a user toreverse the direction of replicate data flow, in which case Site Istarts to behave as a target backup site, and Site II starts to behaveas a source production site. Such change of replication direction isreferred to as a “failover”. A failover may be performed in the event ofa disaster at the production site, or for other reasons. In some dataarchitectures, Site I or Site II behaves as a production site for aportion of stored data, and behaves simultaneously as a backup site foranother portion of stored data. In some data architectures, a portion ofstored data is replicated to a backup site, and another portion is not.

The production site and the backup site may be remote from one another,or they may both be situated at a common site, local to one another.Local data protection has the advantage of minimizing data lag betweentarget and source, and remote data protection has the advantage is beingrobust in the event that a disaster occurs at the source side.

The source and target sides communicate via a wide area network (WAN)128, although other types of networks may be used.

Each side of system 100 includes three major components coupled via astorage area network (SAN); namely, (i) a storage system, (ii) a hostcomputer, and (iii) a data protection appliance (DPA). Specifically withreference to FIG. 1, the source side SAN includes a source host computer104, a source storage system 108, and a source DPA 112. Similarly, thetarget side SAN includes a target host computer 116, a target storagesystem 120, and a target DPA 124. As well, the protection agent(sometimes referred to as a splitter) may run on the host, or on thestorage, or in the network or at a hypervisor level, and that DPAs areoptional and DPA code may run on the storage array too, or the DPA 124may run as a virtual machine.

Generally, a SAN includes one or more devices, referred to as “nodes”. Anode in a SAN may be an “initiator” or a “target”, or both. An initiatornode is a device that is able to initiate requests to one or more otherdevices; and a target node is a device that is able to reply torequests, such as SCSI commands, sent by an initiator node. A SAN mayalso include network switches, such as fiber channel switches. Thecommunication links between each host computer and its correspondingstorage system may be any appropriate medium suitable for data transfer,such as fiber communication channel links.

The host communicates with its corresponding storage system using smallcomputer system interface (SCSI) commands.

System 100 includes source storage system 108 and target storage system120. Each storage system includes physical storage units for storingdata, such as disks or arrays of disks. Typically, storage systems 108and 120 are target nodes. In order to enable initiators to send requeststo storage system 108, storage system 108 exposes one or more logicalunits (LU) to which commands are issued. Thus, storage systems 108 and120 are SAN entities that provide multiple logical units for access bymultiple SAN initiators.

Logical units are a logical entity provided by a storage system, foraccessing data stored in the storage system. The logical unit may be aphysical logical unit or a virtual logical unit. A logical unit isidentified by a unique logical unit number (LUN). Storage system 108exposes a logical unit 136, designated as LU A, and storage system 120exposes a logical unit 156, designated as LU B.

LU B is used for replicating LU A. As such, LU B is generated as a copyof LU A. In one embodiment, LU B is configured so that its size isidentical to the size of LU A. Thus, for LU A, storage system 120 servesas a backup for source side storage system 108. Alternatively, asmentioned hereinabove, some logical units of storage system 120 may beused to back up logical units of storage system 108, and other logicalunits of storage system 120 may be used for other purposes. Moreover,there is symmetric replication whereby some logical units of storagesystem 108 are used for replicating logical units of storage system 120,and other logical units of storage system 120 are used for replicatingother logical units of storage system 108.

System 100 includes a source side host computer 104 and a target sidehost computer 116. A host computer may be one computer, or a pluralityof computers, or a network of distributed computers, each computer mayinclude inter alia a conventional CPU, volatile and non-volatile memory,a data bus, an I/O interface, a display interface and a networkinterface. Generally a host computer runs at least one data processingapplication, such as a database application and an e-mail server.

Generally, an operating system of a host computer creates a host devicefor each logical unit exposed by a storage system in the host computerSAN. A host device is a logical entity in a host computer, through whicha host computer may access a logical unit. Host device 104 identifies LUA and generates a corresponding host device 140, designated as Device A,through which it can access LU A. Similarly, host computer 116identifies LU B and generates a corresponding device 160, designated asDevice B.

In the course of continuous operation, host computer 104 is a SANinitiator that issues I/O requests (write/read operations) through hostdevice 140 to LU A using, for example, SCSI commands. Such requests aregenerally transmitted to LU A with an address that includes a specificdevice identifier, an offset within the device, and a data size. Offsetsare generally aligned to 512 byte blocks. The average size of a writeoperation issued by host computer 104 may be, for example, 10 kilobytes(KB); i.e., 20 blocks. For an I/O rate of 50 megabytes (MB) per second,this corresponds to approximately 5,000 write transactions per second.

System 100 includes two data protection appliances, a source side DPA112 and a target side DPA 124. A DPA performs various data protectionservices, such as data replication of a storage system, and journalingof I/O requests issued by a host computer to source side storage systemdata. As explained in detail herein, when acting as a target side DPA, aDPA may also enable roll back of data to an earlier point in time, andprocessing of rolled back data at the target site. Each DPA 112 and 124is a computer that includes inter alia one or more conventional CPUs andinternal memory.

For additional safety precaution, each DPA is a cluster of suchcomputers. Use of a cluster ensures that if a DPA computer is down, thenthe DPA functionality switches over to another computer. The DPAcomputers within a DPA cluster communicate with one another using atleast one communication link suitable for data transfer via fiberchannel or IP based protocols, or such other transfer protocol. Onecomputer from the DPA cluster serves as the DPA leader. The DPA clusterleader coordinates between the computers in the cluster, and may alsoperform other tasks that require coordination between the computers,such as load balancing.

In the architecture illustrated in FIG. 1, DPA 112 and DPA 124 arestandalone devices integrated within a SAN. Alternatively, each of DPA112 and DPA 124 may be integrated into storage system 108 and storagesystem 120, respectively, or integrated into host computer 104 and hostcomputer 116, respectively. Both DPAs communicate with their respectivehost computers through communication lines such as fiber channels using,for example, SCSI commands or any other protocol.

DPAs 112 and 124 are configured to act as initiators in the SAN; i.e.,they can issue I/O requests using, for example, SCSI commands, to accesslogical units on their respective storage systems. DPA 112 and DPA 124are also configured with the necessary functionality to act as targets;i.e., to reply to I/O requests, such as SCSI commands, issued by otherinitiators in the SAN, including inter alia their respective hostcomputers 104 and 116. Being target nodes, DPA 112 and DPA 124 maydynamically expose or remove one or more logical units.

As described hereinabove, Site I and Site II may each behavesimultaneously as a production site and a backup site for differentlogical units. As such, DPA 112 and DPA 124 may each behave as a sourceDPA for some logical units, and as a target DPA for other logical units,at the same time.

Host computer 104 and host computer 116 include protection agents 144and 164, respectively. Protection agents 144 and 164 intercept SCSIcommands issued by their respective host computers, via host devices tological units that are accessible to the host computers. A dataprotection agent may act on an intercepted SCSI commands issued to alogical unit, in one of the following ways: send the SCSI commands toits intended logical unit; redirect the SCSI command to another logicalunit; split the SCSI command by sending it first to the respective DPA;after the DPA returns an acknowledgement, send the SCSI command to itsintended logical unit; fail a SCSI command by returning an error returncode; and delay a SCSI command by not returning an acknowledgement tothe respective host computer.

A protection agent may handle different SCSI commands, differently,according to the type of the command. For example, a SCSI commandinquiring about the size of a certain logical unit may be sent directlyto that logical unit, while a SCSI write command may be split and sentfirst to a DPA associated with the agent. A protection agent may alsochange its behavior for handling SCSI commands, for example as a resultof an instruction received from the DPA.

Specifically, the behavior of a protection agent for a certain hostdevice generally corresponds to the behavior of its associated DPA withrespect to the logical unit of the host device. When a DPA behaves as asource site DPA for a certain logical unit, then during normal course ofoperation, the associated protection agent splits I/O requests issued bya host computer to the host device corresponding to that logical unit.Similarly, when a DPA behaves as a target device for a certain logicalunit, then during normal course of operation, the associated protectionagent fails I/O requests issued by host computer to the host devicecorresponding to that logical unit.

Communication between protection agents and their respective DPAs mayuse any protocol suitable for data transfer within a SAN, such as fiberchannel, or SCSI over fiber channel. The communication may be direct, orvia a logical unit exposed by the DPA. Protection agents communicatewith their respective DPAs by sending SCSI commands over fiber channel.

Protection agents 144 and 164 are drivers located in their respectivehost computers 104 and 116. Alternatively, a protection agent may alsobe located in a fiber channel switch, or in any other device situated ina data path between a host computer and a storage system or on thestorage system itself. In a virtualized environment, the protectionagent may run at the hypervisor layer or in a virtual machine providinga virtualization layer.

What follows is a detailed description of system behavior under normalproduction mode, and under recovery mode.

In production mode DPA 112 acts as a source site DPA for LU A. Thus,protection agent 144 is configured to act as a source side protectionagent; i.e., as a splitter for host device A. Specifically, protectionagent 144 replicates SCSI I/O write requests. A replicated SCSI I/Owrite request is sent to DPA 112. After receiving an acknowledgementfrom DPA 124, protection agent 144 then sends the SCSI I/O write requestto LU A. After receiving a second acknowledgement from storage system108 host computer 104 acknowledges that an I/O command complete.

When DPA 112 receives a replicated SCSI write request from dataprotection agent 144, DPA 112 transmits certain I/O informationcharacterizing the write request, packaged as a “write transaction”,over WAN 128 to DPA 124 on the target side, for journaling and forincorporation within target storage system 120.

DPA 112 may send its write transactions to DPA 124 using a variety ofmodes of transmission, including inter alia (i) a synchronous mode, (ii)an asynchronous mode, and (iii) a snapshot mode. In synchronous mode,DPA 112 sends each write transaction to DPA 124, receives back anacknowledgement from DPA 124, and in turns sends an acknowledgement backto protection agent 144. Protection agent 144 waits until receipt ofsuch acknowledgement before sending the SCSI write request to LU A.

In asynchronous mode, DPA 112 sends an acknowledgement to protectionagent 144 upon receipt of each I/O request, before receiving anacknowledgement back from DPA 124.

In snapshot mode, DPA 112 receives several I/O requests and combinesthem into an aggregate “snapshot” of all write activity performed in themultiple I/O requests, and sends the snapshot to DPA 124, for journalingand for incorporation in target storage system 120. In snapshot mode DPA112 also sends an acknowledgement to protection agent 144 upon receiptof each I/O request, before receiving an acknowledgement back from DPA124.

For the sake of clarity, the ensuing discussion assumes that informationis transmitted at write-by-write granularity.

While in production mode, DPA 124 receives replicated data of LU A fromDPA 112, and performs journaling and writing to storage system 120. Whenapplying write operations to storage system 120, DPA 124 acts as aninitiator, and sends SCSI commands to LU B.

During a recovery mode, DPA 124 undoes the write transactions in thejournal, so as to restore storage system 120 to the state it was at, atan earlier time.

As described hereinabove, LU B is used as a backup of LU A. As such,during normal production mode, while data written to LU A by hostcomputer 104 is replicated from LU A to LU B, host computer 116 shouldnot be sending I/O requests to LU B. To prevent such I/O requests frombeing sent, protection agent 164 acts as a target site protection agentfor host Device B and fails I/O requests sent from host computer 116 toLU B through host Device B.

Target storage system 120 exposes a logical unit 176, referred to as a“journal LU”, for maintaining a history of write transactions made to LUB, referred to as a “journal”. Alternatively, journal LU 176 may bestriped over several logical units, or may reside within all of or aportion of another logical unit. DPA 124 includes a journal processor180 for managing the journal.

Journal processor 180 functions generally to manage the journal entriesof LU B. Specifically, journal processor 180 enters write transactionsreceived by DPA 124 from DPA 112 into the journal, by writing them intothe journal LU, reads the undo information for the transaction from LUB. updates the journal entries in the journal LU with undo information,applies the journal transactions to LU B, and removes already-appliedtransactions from the journal.

Referring to FIG. 2, which is an illustration of a write transaction 200for a journal. The journal may be used to provide an adaptor for accessto storage 120 at the state it was in at any specified point in time.Since the journal contains the “undo” information necessary to roll backstorage system 120, data that was stored in specific memory locations atthe specified point in time may be obtained by undoing writetransactions that occurred subsequent to such point in time.

Write transaction 200 generally includes the following fields: one ormore identifiers; a time stamp, which is the date & time at which thetransaction was received by source side DPA 112; a write size, which isthe size of the data block; a location in journal LU 176 where the datais entered; a location in LU B where the data is to be written; and thedata itself.

Write transaction 200 is transmitted from source side DPA 112 to targetside DPA 124. As shown in FIG. 2, DPA 124 records the write transaction200 in the journal that includes four streams. A first stream, referredto as a DO stream, includes new data for writing in LU B. A secondstream, referred to as an DO METADATA stream, includes metadata for thewrite transaction, such as an identifier, a date & time, a write size, abeginning address in LU B for writing the new data in, and a pointer tothe offset in the DO stream where the corresponding data is located.Similarly, a third stream, referred to as an UNDO stream, includes olddata that was overwritten in LU B; and a fourth stream, referred to asan UNDO METADATA, include an identifier, a date & time, a write size, abeginning address in LU B where data was to be overwritten, and apointer to the offset in the UNDO stream where the corresponding olddata is located.

In practice each of the four streams holds a plurality of writetransaction data. As write transactions are received dynamically bytarget DPA 124, they are recorded at the end of the DO stream and theend of the DO METADATA stream, prior to committing the transaction.During transaction application, when the various write transactions areapplied to LU B, prior to writing the new DO data into addresses withinthe storage system, the older data currently located in such addressesis recorded into the UNDO stream. In some examples, the metadata stream(e.g., UNDO METADATA stream or the DO METADATA stream) and the datastream (e.g., UNDO stream or DO stream) may be kept in a single streameach (i.e., one UNDO data and UNDO METADATA stream and one DO data andDO METADATA stream) by interleaving the metadata into the data stream.

In some embodiments, a consistency group (CG) may be a set of logicalunits (LUs) or virtual machines which are replicated together for whichwrite order fidelity is preserved.

A CG construct take significant amount of resources from the system, andthus the amount of CGs the system can run is limited. Hence, it isresource prohibitive to generate a CG construct for every virtualmachine replicated in some cases. In response to these constraintsmultiple unrelated virtual machines or LUs are grouped in a single CG.On the other hand, a CG also has limited performance and thus if the CGincludes entities which have too high of a performance requirement, itmay be better to separate the CG into several CG constructs. Thus, it isdesirable to unify multiple CGs into a single CG and be able to separateCG into more than one CG.

A new virtual CG may be formed which may include several internal CGs.The virtual CG may be presented to the user and the user may be able toperform all actions on the virtual CG. Internally, in some examples,each internal CG may replicate just some of the stripes of the volumes.As well as consistency point may be achieved across internal CGs. Thatis, it may be possible to form an image of a particular time by rollingeach internal CG group to that time. In some examples, the internal CGsmay not be exposed to the user and all actions happen automatically onthe internal CGs when performed on the virtual CG. Internal CG groupsmay also be referred to as Grid Copies. In a further example, one boxmay be accepting all the I/Os, this box will split the I/Os betweenrelevant boxes running the consistency groups. In one example, each gridCG may receive its own IOs.

In cloud platforms, using the processes described in FIGS. 1 and 2, dataprotection system 100 faces a number of challenges and biggest amongthem are scalability issues. One way to solve such issues is the abilityto unify or separate the data processing according to the needs of thesystem or a user.

For example, suppose a user tries to replicate 1000 low traffic virtualmachines (VMs). In current system architecture the only choices forsystem configuration are: 1. define a separate consistency group (CG)for each VM; or 2. put a number of VMs in the same CG and make less CGs.

The first configuration will use a lot of resources in the replicationprocess. For example, each group will require separate journal space,separate memory reservations. In practice, the system will reach itsmemory, CPU and disk space limits despite the fact that traffic is low.

The second configuration has two major problems. In the first problem,operations “Test copy”, “Failover” and “Recover production” can be donefor a CG only so that if one VM has a data corruption on production sitethe problem cannot be fixed without destroying the production copy forother VMs. In the second problem, if a VM in CG has a traffic peak theCG will enter a high load state and replication from all VMs in the CGwill be stopped.

The solution of the problem involves keeping a number of VMs in one CGuntil a problem occurs and then separate out the VM into a new CG. Whenthe problems pass merging the VM back into the old CG. Techniques toaccomplish these objectives are further described herein.

Referring to FIG. 3, a diagram 300 is an example of separating a virtualmachine into a separate consistency group, according to one embodimentof the disclosure. In this example, a consistency group CG1 includes afirst virtual machine VM1, a second virtual machine VM2, a third virtualmachine VM3 and a fourth virtual machine VM4. VM4 needs to be separatedfrom CG1 due to performance issues such high IOPS (Input/OutputOperations Per Second), for example. Thus, a consistency group CG2 isformed with VM4.

FIG. 4 is a flowchart of an example of a process to separate a virtualmachine into a separate consistency group as shown in FIG. 3, accordingto one embodiment of the disclosure. For example, process 400 splits aconsistency group, CG2 having a first virtual machine (VM1), a secondvirtual machine (VM2), a third virtual machine (VM3) and a fourthvirtual machine (VM4) and forms two new consistency group, CG2 for VM4and CG3 for VM1, VM2 and VM3.

Process 400 generates a new DO METADATA stream for CG2 (402) andgenerates a new DO stream for CG2 (404). Process 400 generates a new DOMETADATA stream for CG3 (406) and generates a new DO stream for CG3(408).

Process 400 pauses distribution (410). For example, no data is read froma DO streams and moved to an UNDO stream.

Process 400 writes new data arriving to CG2 to its DO stream and thecorresponding metadata to its DO METADATA stream (412). For example,data from new I/Os arriving to VM4 are written to the DO streamgenerated in processing block 404 and the corresponding metadata fromthe new I/Os arriving to VM4 are written to the DO METADATA streamgenerated in processing block 402.

Process 400 writes new data arriving to CG3 to its DO stream and thecorresponding metadata to its DO METADATA stream (414). For example,data from new I/Os arriving to VM1 is written to the DO stream generatedin processing block 408 and the corresponding metadata from these newI/Os is written to the DO METADATA stream generated in processing block406.

Process 400 separates the DO METADATA stream of CG1 (416). For example,a background process separates the metadata DO stream of CG1 into thebeginning of the metadata streams of CG2, CG3 respectively. For example,process 400 copies metadata entries which relate to VM4 to the DOMETADATA stream of CG2 and of VM1, VM2, VM3 to the DO METADATA stream ofCG1. Since the metadata includes pointers to the locations of thestorage where the data corresponding to the metadata exists in the DOstream when the distribution process continues (e.g., data is read froma DO stream and moved to an UNDO stream), it can access the data andapply it to the remote storage. In one particular example, for eachblock referenced, the reference count is increased by 1.

Process 400 separates the UNDO METADATA stream of CG1 (418). Forexample, a background process separates the metadata UNDO stream of CG1into the beginning of the metadata streams of CG2, CG3 respectively. Forexample, process 400 copies metadata entries which relate to VM4 to theUNDO METADATA stream of CG2 and of VM1, VM2 and VM3 to the UNDO METADATAstream of CG1. In one particular example, for each block referenced, thereference count is increased by 1.

Process 400 allocates new blocks of data to the UNDO stream of CG2 (420)and allocates new blocks of data to the UNDO stream of CG3 (422).

Process 400 resumes distribution process (424). For example, data isread from the DO streams and moved to the UNDO streams. In one example,after a new data is written to VM4 the data is sent to the UNDO streamof CG2. In another example, after a data is written to VM1 the data issent to the UNDO stream of CG3.

In one example, each stream of data is a list of blocks with relativelylarge size (e.g., 100 MB). The reason the streams are a list of blocksis to be able to sequentially write data to the storage as sequentialwrites, which are much faster for spindle-type storage. When data isdistributed and data from a block is moved from the DO stream to theUNDO stream the block is erased and returns to the free block pool.Since after the separation into two streams a block may belong to twoseparate streams. A block can be erased only when it can be erased fromthe perspective of the two streams. For this reason a reference count isadded to each block and when one stream wants to erase the block is justreduces the reference count. When the reference count reaches 0 theblock is returned to the free pool block.

After the separation of the data streams, some operations maytemporarily be less sequential as the data of a single CG may not becontinuous in a single block. Caching and similar optimization mayreduce the amount of non-sequential reads. As new data is writtensequentially to each CG operations will return to be sequentialeventually.

Referring to FIG. 5, a diagram 500 is an example of joining consistencygroups, according to one embodiment of the disclosure. In this example,a consistency group CG4 includes a fifth virtual machine VM5, a sixthvirtual machine VM6 and a seventh virtual machine VM7. A consistencygroup CG5 includes an eighth virtual machine VM8. CG4 is joined with CG5to form CG6 that includes VM5, VM6, VM7 and VM8.

FIG. 6 is a flowchart of an example of a process to join consistencygroups as shown in FIG. 5, according to one embodiment of thedisclosure. For example, process 600 CG4 is combined with CG5 to formCG6. In one example, process 600 is performed without losing journaldata and without copying data.

Process 600 waits for the DO streams of CG4 and CG5 to be at the samepoint-in-time (602). A problem may arise if the DO stream of CG4 isupdated to a later point-in-time than the DO stream of CG5 orvisa-versa. Therefore, process 600 waits for the CG4 and CG5 to be atthe same point-in-time in their respective DO streams. For example, thisis performed by rolling the CG which points to an earlier point-in-timewhile stopping the rolling of the other CG.

Process 600 generates a DO stream for CG6 (604) and generates a DOMETADATA stream (608). For example, all the new I/Os generated by VMS,VM6, VM7 and VM8 will be sent to the DO stream for CG6 and the metadatafor these new I/Os will be sent to the DO METADATA stream for CG6.

Process 600 combines the DO METADATA streams of CG4 and CG5 (612). Forexample, the DO METADATA stream of CG4 and the DO METADATA stream of CG5are combined to form a new DO METADATA stream. For example, the list ofmetadata of the two CGs is interlaced into a single metadata streamaccording to the order of the timestamps.

Process 600 attaches the combined DO METADATA streams of CG4 and CG5 tothe DO METADATA steam of CG6 (618). For example, the new DO METADATAstream formed in processing block 612 is attached to the beginning ofthe DO METADATA stream of CG6.

Process 600 combines the UNDO METADATA streams of CG4 and CG5 (622). Forexample, the UNDO METADATA stream of CG4 and the UNDO METADATA stream ofCG5 are combined to form a new UNDO METADATA stream. As data isdistributed from the DO stream to the UNDO stream and old blocks of theUNDO stream are erased the data of the combined CG, becomes sequentialon single blocks.

Referring to FIG. 7, in one example, a computer 700 includes a processor702, a volatile memory 704, a non-volatile memory 706 (e.g., hard disk)and the user interface (UI) 708 (e.g., a graphical user interface, amouse, a keyboard, a display, touch screen and so forth), according toone embodiment of the disclosure. The non-volatile memory 706 storescomputer instructions 712, an operating system 716 and data 718. In oneexample, the computer instructions 712 are executed by the processor 702out of volatile memory 704 to perform all or part of the processesdescribed herein (e.g., processes 400 and 600).

The processes described herein (e.g., processes 400 and 600) are notlimited to use with the hardware and software of FIG. 7; they may findapplicability in any computing or processing environment and with anytype of machine or set of machines that is capable of running a computerprogram. The processes described herein may be implemented in hardware,software, or a combination of the two. The processes described hereinmay be implemented in computer programs executed on programmablecomputers/machines that each includes a processor, a non-transitorymachine-readable medium or other article of manufacture that is readableby the processor (including volatile and non-volatile memory and/orstorage elements), at least one input device, and one or more outputdevices. Program code may be applied to data entered using an inputdevice to perform any of the processes described herein and to generateoutput information.

The system may be implemented, at least in part, via a computer programproduct, (e.g., in a non-transitory machine-readable storage medium suchas, for example, a non-transitory computer-readable medium), forexecution by, or to control the operation of, data processing apparatus(e.g., a programmable processor, a computer, or multiple computers)).Each such program may be implemented in a high level procedural orobject-oriented programming language to communicate with a computersystem. However, the programs may be implemented in assembly or machinelanguage. The language may be a compiled or an interpreted language andit may be deployed in any form, including as a stand-alone program or asa module, component, subroutine, or other unit suitable for use in acomputing environment. A computer program may be deployed to be executedon one computer or on multiple computers at one site or distributedacross multiple sites and interconnected by a communication network. Acomputer program may be stored on a non-transitory machine-readablemedium that is readable by a general or special purpose programmablecomputer for configuring and operating the computer when thenon-transitory machine-readable medium is read by the computer toperform the processes described herein. For example, the processesdescribed herein may also be implemented as a non-transitorymachine-readable storage medium, configured with a computer program,where upon execution, instructions in the computer program cause thecomputer to operate in accordance with the processes. A non-transitorymachine-readable medium may include but is not limited to a hard drive,compact disc, flash memory, non-volatile memory, volatile memory,magnetic diskette and so forth but does not include a transitory signalper se.

The processes described herein are not limited to the specific examplesdescribed. For example, the processes 400 and 600 are not limited to thespecific processing order of FIGS. 4 and 6, respectively. Rather, any ofthe processing blocks of FIGS. 4 and 6 may be re-ordered, combined orremoved, performed in parallel or in serial, as necessary, to achievethe results set forth above.

The processing blocks (for example, in the processes 400 and 600)associated with implementing the system may be performed by one or moreprogrammable processors executing one or more computer programs toperform the functions of the system. All or part of the system may beimplemented as, special purpose logic circuitry (e.g., an FPGA(field-programmable gate array) and/or an ASIC (application-specificintegrated circuit)). All or part of the system may be implemented usingelectronic hardware circuitry that include electronic devices such as,for example, at least one of a processor, a memory, a programmable logicdevice or a logic gate.

Elements of different embodiments described herein may be combined toform other embodiments not specifically set forth above. Otherembodiments not specifically described herein are also within the scopeof the following claims.

What is claimed is:
 1. A method comprising: separating a set of virtualmachines from a first consistency group to a second consistency groupand third consistency group; and combining a first virtual machine ofthe second consistency group to the third consistency group to form afourth consistency group, wherein the set of virtual machines in thefirst consistency group are replicated together for which write orderfidelity is preserved; wherein virtual machines in the fourthconsistency group are replicated together for which write order fidelityis preserved; wherein combining the first virtual machine of the secondconsistency group to the third consistency group to form the fourthconsistency group comprises: generating a DO stream for the fourthconsistency group; generating a DO METADATA stream for the fourthconsistency group; combining DO METADATA streams of the secondconsistency group and the third consistency group to form a combined DOMETADATA; attaching the combined DO METADATA to the DO METADATA streamof the fourth consistency group; combining UNDO METADATA streams of thesecond and third consistency groups; and after writing new data to thefourth consistency group, sending the new data to an UNDO stream of thesecond consistency group; wherein combining the first virtual machine ofthe second consistency group to a third consistency group furthercomprises waiting for the second consistency group and the thirdconsistency group to be distributed at the same point of time, whereindistribution at the same point of time is performed by rolling one ofthe second consistency group and the third consistency group that pointsto an earlier point in time while stopping rolling of the other of thesecond consistency group and the third consistency group.
 2. The methodof claim 1, wherein combining the first virtual machine of the secondconsistency group to a third consistency group to form a fourthconsistency group comprises combining the first virtual machine of thesecond consistency group to a third consistency group to form a fourthconsistency group without losing journal and without data copying. 3.The method of claim 1, wherein separating a set of virtual machines froma first consistency group to a second consistency group and thirdconsistency group comprises: generating a DO METADATA stream and DOstream for the second consistency group; generating a DO METADATA streamand DO stream for the third consistency group; pausing distribution ofdata, the pausing comprising stopping reads of data from the DO streamsand movement to the UNDO streams; writing data from new I/Os arriving tothe second consistency group to its DO stream and corresponding metadatato its DO METADATA stream; and writing data from new I/Os arriving tothe third consistency group to its DO stream and corresponding metadatato its DO METADATA stream.
 4. The method of claim 3, wherein separatinga set of virtual machines from a first consistency group to a secondconsistency group and third consistency group further comprises:separating a DO METADATA stream of the first consistency group into theDO METADATA streams of the second and third consistency groups; andseparating an UNDO METADATA stream of the first consistency group intoUNDO METADATA streams of the second and third consistency groups.
 5. Themethod of claim 4, wherein each of the DO stream, UNDO stream, DOMETADATA stream, and UNDO METADATA stream comprises a list of blocks,wherein when data from one of the blocks is moved from one of thestreams to another, the corresponding one of the blocks is erased andreturned to a block pool.
 6. The method of claim 5, wherein afterseparating the DO METADATA stream of the first consistency group intothe DO METADATA streams of the second and third consistency groups, andafter separating the UNDO METADATA stream of the first consistency groupinto UNDO METADATA streams of the second and third consistency groups,the method further comprises: identifying a block belonging to bothstreams and erasing the block belonging to both streams after themovement only when it can be erased from both streams.
 7. An apparatus,comprising: a processor and a memory configured to: separate a set ofvirtual machines from a first consistency group to a second consistencygroup and third consistency group; combine a first virtual machine ofthe second consistency group to the third consistency group to form afourth consistency group, wherein the set of virtual machines in thefirst consistency group are replicated together for which write orderfidelity is preserved; wherein virtual machines in the fourthconsistency group are replicated together for which write order fidelityis preserved; wherein the processor and memory configured to combine thefirst virtual machine of the second consistency group to the thirdconsistency group to form the fourth consistency group comprisescircuitry configured to: generate a DO stream for the fourth consistencygroup; generate a DO METADATA stream for the fourth consistency group;combine DO METADATA streams of the second consistency group and thethird consistency group to form a combined DO METADATA; attach thecombined DO METADATA to the DO METADATA stream of the fourth consistencygroup; combine UNDO METADATA streams of the second and third consistencygroups; and after writing new data to the fourth consistency group,sending the new data to an UNDO stream of the second consistency group,wherein combining the first virtual machine of the second consistencygroup to a third consistency group further comprises waiting for thesecond consistency group and the third consistency group to bedistributed at the same point of time, wherein distribution at the samepoint of time is performed by rolling one of the second consistencygroup and the third consistency group that points to an earlier point intime while stopping rolling of the other of the second consistency groupand the third consistency group.
 8. The apparatus of claim 7, whereinthe processor and the memory are configured to combine the first virtualmachine of the second consistency group to a third consistency group toform a fourth consistency group comprises circuitry configured tocombine the first virtual machine of the second consistency group to athird consistency group to form a fourth consistency group withoutlosing journal and without data copying.
 9. The apparatus of claim 7,wherein the processor and the memory configured to separate a set ofvirtual machines from a first consistency group to a second consistencygroup and third consistency group comprises circuitry configured to:generate a DO METADATA stream and DO stream for the second consistencygroup; generate a DO METADATA stream and DO stream for the thirdconsistency group; pause distribution of data by stopping reads of datafrom the DO streams and movement to the UNDO streams; write data fromnew I/Os arriving to the second consistency group to its DO stream andcorresponding metadata to its DO METADATA stream; and write data fromnew I/Os arriving to the second third consistency group to its DO streamand corresponding metadata to its DO METADATA stream.
 10. The apparatusof claim 9, wherein the processor and the memory configured to separatea set of virtual machines from a first consistency group to a secondconsistency group and third consistency group comprises circuitryconfigured to: separate a DO METADATA stream of the first consistencygroup into the DO METADATA streams of the second and third consistencygroups; and separate an UNDO METADATA stream of the first consistencygroup into UNDO METADATA streams of the second and third consistencygroups.
 11. An article comprising: a non-transitory computer-readablemedium that stores computer-executable instructions, the instructionscausing a machine to: separate a set of virtual machines from a firstconsistency group to a second consistency group and third consistencygroup; and combine a first virtual machine of the second consistencygroup to the third consistency group to form a fourth consistency group,wherein the set of virtual machines in the first consistency group arereplicated together for which write order fidelity is preserved; whereinvirtual machines in the fourth consistency group are replicated togetherfor which write order fidelity is preserved; wherein the instructionscausing the machine to combine the first virtual machine of the secondconsistency group to the third consistency group to form the fourthconsistency group comprises instructions causing the machine to combine:generate a DO stream for the fourth consistency group; generate a DOMETADATA stream for the fourth consistency group; combine DO METADATAstreams of the second consistency group and the third consistency groupto form a combined DO METADATA; attach the combined DO METADATA to theDO METADATA stream of the fourth consistency group; combine UNDOMETADATA streams of the second and third consistency groups; and afterwriting new data to the fourth consistency group, sending the new datato an UNDO stream of the second consistency group; wherein combining thefirst virtual machine of the second consistency group to a thirdconsistency group further comprises waiting for the second consistencygroup and the third consistency group to be distributed at the samepoint of time, wherein distribution at the same point of time isperformed by rolling one of the second consistency group and the thirdconsistency group that points to an earlier point in time while stoppingrolling of the other of the second consistency group and the thirdconsistency group.
 12. The article of claim 11, wherein the instructionscausing the machine to combine the first virtual machine of the secondconsistency group to a third consistency group to form a fourthconsistency group comprises instructions causing the machine to combinethe first virtual machine of the second consistency group to a thirdconsistency group to form a fourth consistency group without losingjournal and without data copying.
 13. The article of claim 11, whereinthe instructions causing the machine to separate a set of virtualmachines from a first consistency group to a second consistency groupand third consistency group comprises instructions causing the machineto: generate a DO METADATA stream and DO stream for the secondconsistency group; generate a DO METADATA stream and DO stream for thethird consistency group; pause distribution of data by stopping reads ofdata from the DO streams and movement to the UNDO streams; write datafrom new I/Os arriving to the second consistency group to its DO streamand corresponding metadata to its DO METADATA stream; and write datafrom new I/Os arriving to the second third consistency group to its DOstream and corresponding metadata to its DO METADATA stream.
 14. Thearticle of claim 13, wherein the instructions causing the machine toseparate a set of virtual machines from a first consistency group to asecond consistency group and third consistency group further comprisesinstructions causing the machine to: separate a DO METADATA stream ofthe first consistency group into the DO METADATA streams of the secondand third consistency groups; and separate an UNDO METADATA stream ofthe first consistency group into UNDO METADATA streams of the second andthird consistency groups.